package com.atguigu.designpattern.simplefactory;

/**
* @program: springcloud
* @description: 计算器，简单工厂模式：创建不同的对象
* @author: wangjun
* @create: 2021-05-12
**/
public class CalculationMain {

    public static void main(String[] args) {
        Operation operation = OperationFactory.getOperation("+");
        double result = operation.getResult(1.0,80);
        System.out.println(result);

        Operation operation1 = OperationFactory.getOperation("*");
        System.out.println(operation1.getResult(23, 78));
    }
}
